<template>
	<view>
		<view class="m-list">
			<view class="m-item" v-for="(item,index) in list" @click="clickItemFun(item)" :key="index">
				<view class="m-item-font1">
					<text>{{item.header_title}}</text>
				</view>
				<view class="m-item-font2">
					<text>{{item.tax_no}}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[]
			}
		},
		onLoad() {
			this.getListFun()
		},
		methods: {
			clickItemFun(item){
				uni.$emit('selectInvoiceTitle',item)
				this.to_back()
			},
			getListFun(){
				this.$http.getJson('hotal_headerList',{}).then(res=>{
					if(res.code == 1){
						this.list = res.data 
					}
				})
			}
		}
	}
</script>

<style lang="scss">
page{
	background: #f5f5f5;
}
.m-list{
	padding-top: 20rpx;
	.m-item{
		background: #fff;
		padding: 28rpx 25rpx;
		margin-bottom: 20rpx;
		.m-item-font1{
			font-size: 30rpx;
			color: #33302D;
		}
		.m-item-font2{
			font-size: 28rpx;
			color: #76706B;
			margin-top: 12rpx;
		}
	}
}
</style>
